home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
IFRSIM.DSK
/
LOST IN CARACAS.bas
< prev
next >
Wrap
BASIC Source File
|
2014-09-09
|
4KB
|
124 lines
20 S = 100:S1 = 0:UP = 24579
30 ST = 24576:O1 = ST +56:O2 = ST +58:I1 = ST +60:I2 = ST +61:MA = ST +12:X1 = ST +26:Y1 = ST +28:AL = ST +87
40 SH = ST +09:PL = ST +06:LI = ST +15:XY = ST +18:DF = ST +39:CH = ST +93:WS = ST +42:WW = ST +43:WN = ST +44:WE = ST +45
50 REM
51 REM NAV AID LOCATIONS
52 REM
60 XC = 130:YC = 100:XF = 64:YF = 121
61 REM
62 REM FIELD ELEVATION
63 REM
64 FE% = 16
65 REM
70 TEXT : GOSUB 5000
80 MT = 15:GAS = 0:MI = 0:SE = 0:S1 = 0
81 REM
82 REM SET UP WIND DRIFT
83 REM
90 POKE WN,0: POKE WE,0: POKE WS,0: POKE WW,0
100 A% = RND(1) *4:B% = RND(1) *50
110 ON A% GOTO 120,130,140,150
120 POKE WN,B%: GOTO 160
130 POKE WE,B%: GOTO 160
140 POKE WS,B%: GOTO 160
150 POKE WW,B%: GOTO 160
160 CALL ST
170 POKE O1,32: POKE O2,32: POKE I1,48: POKE I2,48
171 REM
172 REM
175 REM OMNI MESSAGE AND
176 REM STARTING X Y CORD
177 REM
180 VTAB 22: REM OMNI MESSAGE
190 POKE X1, RND(1) *100 +50: POKE Y1, RND(1) *100 +50
191 REM
192 REM STARTING ALTITUDE
193 REM
200 POKE AL,36: POKE AL -3,50:MA% = 18
201 REM
202 REM
210 CALL UP
220 S1 = S1 +1: IF S1 >S THEN 270
230 GOTO 210
240 REM
250 REM UPDATE THE CLOCK
260 REM
270 S1 = 0:SE = SE +1: IF SE <60 THEN 280
271 SE = 0:MI = MI +1:GA = GA +1: IF GA = MT THEN 550
272 GOTO 210
280 HTAB 1: VTAB 24: PRINT HO;":";MI;":";SE;" ";DM%;".";DN%;" DME ";
281 REM
282 REM DO ADF AND OMNI
283 REM
290 X = PEEK(X1):Y = PEEK(Y1):XD = XC -X:YD = YC -Y
300 IX = XF -X:IY = YF -Y:DX = Y -(108 -X/20):DY = Y -(60 +X/1.5)
301 REM
302 REM DO THE DME
303 REM
304 IF XD <0 THEN XD = XD * -1
305 IF YD <0 THEN YD = YD * -1
306 DM% = SQR(XD ^2 +YD ^2)
307 DM% = DM% *2:DN% = DM%/10:DN% = DN% *10:DN% = DM% -DN%:DM% = DM%/10
308 REM
309 REM DO THE ADF
310 REM
311 IF IX = 0 THEN 330
320 IT = IY/IX
330 T1 = ATN(IT)
340 T1% = 16 -10 *T1
350 IF X >XF THEN PF% = (176 -T1%) - PEEK(CH)
360 IF X <XF THEN PF% = (208 -T1%) - PEEK(CH)
370 IF PF% >64 THEN PF% = PF% -64: GOTO 370
380 POKE DF,PF%
381 REM
382 REM DO THE OMNI
383 REM
390 IF DY < -5 THEN DY = -6
400 IF DY >5 THEN DY = 6
410 IF DX < -5 THEN DX = -6
420 IF DX >5 THEN DX = 6
430 IF DI >5 THEN DI = 6
440 IF DI < -5 THEN DI = -6
450 POKE O1,32 +DX: POKE I1,48
460 POKE O2,32 +DY: POKE I2,48
461 REM
462 REM DO THE GLIDE SLOPE
463 REM
470 IF PEEK(ALT) <MA% THEN 550
480 SL = 77 -X/3:DI = PEEK(ALT) +FE% -SL
490 IF DI >5 THEN DI = 6
500 IF DI < -5 THEN DI = -6
530 POKE I1,48 -DI
540 IF PEEK(AL) >MA% THEN 210
545 REM
546 REM DO THE AIRPORT
547 REM
550 HGR : HCOLOR= 3: CALL 24588
551 REM
552 REM FIRST THE AIRPORT
553 REM
554 HCOLOR= 2: HPLOT 130,100: HPLOT TO 140,100: HPLOT 130,101: HPLOT TO 140,101
555 HPLOT 54,121: HPLOT 56,121: HPLOT 54,122: HPLOT 56,122
580 REM
582 REM THEN THE NAV TRACK
583 REM
584 FOR I = 30 TO 125 STEP 8:J = 108 -I/20
585 HPLOT I,J: NEXT
586 FOR I = 20 TO 105 STEP 2:J = 60 +I/1.5
587 HPLOT I,J: NEXT
590 HOME : VTAB 23: PRINT "PUSH RETURN TO FLY THIS AGAIN": PRINT "ANY OTHER KEY WILL GO BACK TO MENU": GET A$
595 IF ASC(A$) = 13 THEN 70
596 PRINT CHR$(4)
597 PRINT CHR$(4);"RUN MENU"
599 END
600 REM
5000 TEXT : HOME : PRINT "YOU ARE LOST IN CARACAS"
5010 PRINT : PRINT "YOUR ETA IS UP - FIND THE AIRPORT AND"
5020 PRINT : PRINT "LAND"
5050 PRINT : PRINT "ADF IS SAN SEBASTIAN - BOT OMNI IS"
5060 PRINT : PRINT "NO LEON - NOL - 148 R"
5070 PRINT : PRINT "COPYRIGHT 1982 BY VERNON BROWN": PRINT "COPYRIGHT 1982 BY PROGRAMMERS SOFTWARE"
5080 PRINT : PRINT "CUSTOM PROGRAMMED FOR"
5090 PRINT "AEROPUERTO DE CARACAS"
5100 PRINT "INTERNACIONAL DEL CENTRO"
6000 PRINT : PRINT "HIT ANY KEY WHEN READY TO FLY": GET A$: HOME : RETURN